package com.day21.ClientDemo;

import java.io.*;
import java.net.ServerSocket;
import java.net.Socket;

public class SeverDemo{
    public static void main(String[] args) throws IOException {
        ServerSocket ss = new ServerSocket(10000);
        Socket s = ss.accept();
        BufferedReader br = new BufferedReader(new InputStreamReader(s.getInputStream()));
        BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(s.getOutputStream()));
        String line;
        while ((line = br.readLine()) != null) {
            System.out.println("数据是：" + line);
        }
        ss.close();
    }
}
